#include<bits/stdc++.h>
using namespace std;
const long long mod=998244353;
long long LEFT,RIGHT,L1=0,L2=0;
int main() {
ios::sync_with_stdio(false);
	scanf("%lld%lld",&LEFT,&RIGHT);
	for(long long L=1,R; L<=RIGHT; L=R+1) {
		R=RIGHT/(RIGHT/L);
		L1=(L1+(RIGHT/L)%mod*((R-L+1)%mod)%mod)%mod;
	}
	for(long long L=1,R; L<=LEFT-1; L=R+1) {
		R=(LEFT-1)/((LEFT-1)/L);
		L2=(L2+((LEFT-1)/L)%mod*((R-L+1)%mod)%mod)%mod;
	}
	printf("%lld\n",((L1-L2)%mod+mod)%mod);
}